package cellphone

import (
	"shqsoft.cn/pas3ui/popedom"
)

func GetUserRoleType(userID int) (rtype uint8, err error) {
	rtype = 2
	var ok bool
	ok, err = popedom.IsHasRole(userID, 100)
	if err != nil {
		return
	}
	if ok {
		rtype = 0
	} else {
		ok, err = popedom.IsHasRole(userID, 101)
		if err != nil {
			return
		}
		if ok {
			rtype = 1
		}
	}
	return
}
